package bma.common.langutil.jdbc;

import java.util.LinkedList;
import java.util.List;

/**
 * @since 1.0 (imported from BMA.ESP Project)
 * @author guanzhong
 * 
 */
public class FieldValues implements java.io.Serializable {

	private static final long serialVersionUID = 3257850982569162297L;

	private List<FieldValue> fieldValues = new LinkedList<FieldValue>();

	public FieldValues() {
	}

	public List<FieldValue> getFieldValues() {
		return fieldValues;
	}

	protected void add(String fname, Object type, Object obj) {
		add(fname, type, obj, null);
	}

	protected void add(String fname, Object type, Object obj, String exp) {
		add(new FieldValue(fname, type, obj, exp));
	}

	protected void add(FieldValue fv) {
		fieldValues.add(fv);
	}

	public void clear() {
		fieldValues.clear();
	}

	public int size() {
		return fieldValues.size();
	}

	public boolean empty() {
		return size() == 0;
	}

	public boolean notEmpty() {
		return size() > 0;
	}

}
